class Solution:
    def subtractProductAndSum(self, n: int) -> int:
        m,s=1,0
        while n > 0:
            r = n % 10
            m*=r
            s+=r
            n//=10
        return m - s
    
print(chr(127))
print(0x7f)
print(ord(chr(127)))